6.1 How to react to mouse movement

  1. Motivations

  2. :hover
    • Trial 1: Let's change the background color of a button in a <p> element that belongs to the class 'tr1', when the mouse moves over the button, not the <p> element.


    • Trial 2: Let's change the background color of a <button> that belongs to the class 'tr2', when the mouse moves over the button. Let's display the <ul> that is a child of the <button> at the same time.


  3. :active
    • How to use?
  4. clicking
    • We need some thing better than CSS.
    • JavaScript - a scripting language for rich user interface
    • We will discuss the language soon.
  5. double clicking
    • We need some thing better than CSS.
    • JavaScript - a scripting language for rich user interface
    • We will discuss the language soon.
  6. Is there any other mouse actions?